<!--
 * @Author: your name
 * @Date: 2020-06-04 15:32:23
 * @LastEditTime: 2020-06-16 16:46:23
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \IM_Web\im_web\src\components\searchCompany\searchCompany.vue
--> 
<template>
    <div class="searchCompany flex">
        <iInput placeholder="输入企业ID进行绑定" class="search" v-model="eid"></iInput>
        <Button class="jion_btn" @click="enterprisesBind">申请加入</Button>
    </div>
</template>

<script>
export default {
    name: "searchCompany",
    props: {},
    data() {
        return {
            eid: ""
        };
    },
    computed: {},
    created() {},
    mounted() {},
    watch: {},
    methods: {
        enterprisesBind() {
            if (this.eid === "") {
                return;
            }
            let params = {
                eid: this.eid
            };
            this.http.enterprisesBind(params).then(res => {
                console.log(res);
                this.$Message.destroy();
                if (res.data.errno === "000") {
                    console.log(res);
                    this.$Message.success(res.data.errmsg);
                } else {
                    this.$Message.error({
                        content: res.data.errmsg,
                        background: true
                    });
                }
            });
        }
    },
    components: {}
};
</script>
<style>
.searchCompany .ivu-input {
    height: 60px;
    line-height: 60px;
    font-size: 22px;
    background: rgba(247, 246, 246, 1);
    border-radius: 10px;
    border: 0;
    padding-left: 18px;
}
</style>
<style scoped lang="less">
.searchCompany {
    padding: 50px;
    box-sizing: border-box;
    .search {
        width: 510px;
        height: 60px;
    }
    .jion_btn {
        width: 200px;
        height: 60px;
        background: rgba(35, 150, 247, 1);
        border-radius: 10px;
        border: 0;
        color: #fff;
        font-size: 22px;
        margin-left: 27px;
    }
}
</style>
